package com.inight.nightojbackenduserservice;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableScheduling;

// todo 如需开启 Redis，须移除 exclude 中的内容
@SpringBootApplication
@MapperScan("com.inight.nightojbackenduserservice.mapper")
@EnableScheduling
@EnableAspectJAutoProxy(proxyTargetClass = true, exposeProxy = true)
// todo 注意需要加一个包扫描, 因为统一异常处理在另外的model 里. 默认不会扫描别的
@ComponentScan("com.inight")

@EnableDiscoveryClient // 服务发现 nacos
@EnableFeignClients(basePackages = "com.inight.nightojbackendserviceclient.service") // openfeign
public class NightojBackendUserServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(NightojBackendUserServiceApplication.class, args);
    }

}
